#{extends 'EmploymentAction/layout.html' /}

<div id="crudList" class="">

    <h2 id="crudListTitle">广告管理</h2>

    <div id="crudListSearch">
    </div>

    <div id="crudListTable">
        <table>
       <thead>
         <tr>
           <th>广告标题</th>
           <th>广告代码</th>
           <th>链接</th>
           <th>排序</th>
           <th>广告位</th>
           <th>删除</th>
         </tr>
       </thead>
       #{if flash.success}
	    <tr>
		    <td colspan="7" style="text-align: center">
		    <font color="red">${flash.success}</font>
		    </td>
	    </tr>
       #{/if}
       #{list items:adverts,as:'advert'}
        <tr>
          <td><a href="@{show(advert.id)}">${advert.advTit}</a></td>
          <td>${advert.advCode}</td>
          <td>${advert.advHref}</td>
          <td>${advert.advDesc}</td>
          <td>${advert.adpo?.adpName}</td>
          <td><a href="@{delete(advert.id,id)}">删除</a></td>
        </tr>
       #{/list}
    </table>
    </div>

    <div id="crudListPagination">
    </div>

    <p id="crudListAdd">
        <a href="@{blank(id)}">添加</a>
    </p>

</div>
